﻿#pragma once
#include <sfse_common/Utilities.h>

#include "sfse/GameEvents.h"

struct MBParams
{
    MBParams() {};
    void* locker; // 00
    void* header; // 08
    void* pad10; // 10
    void* text; // 18
    void* pad20; // 20
    void* unk28; // 28
    void* pad30; // 30
    u32 flag; // 38        
};
static_assert(sizeof(MBParams) == 0x40);

typedef MBParams* (*_MBCreateStruct)(const MBParams& params, const char* header, const char* text, void* unk, u32 flag);
extern RelocAddr<_MBCreateStruct> MBCreateStruct;
typedef void (*_MBReleaseStruct)(const MBParams& params);
extern RelocAddr<_MBReleaseStruct> MBReleaseStruct;

class MessageMenuManager : public BSTEventSink<MenuOpenCloseEvent>
{
public:
    MessageMenuManager() { }
    virtual ~MessageMenuManager() { }

    MEMBER_FN_PREFIX(MessageMenuManager);
    DEFINE_MEMBER_FN(MessageBox, void, 0x028ACA14, const MBParams& params);

    void ShowMessageBox(const char* header, const char* text);
    void ShowMessageBoxEx(const char* header, const char* text, u32 flag);
};
static_assert(sizeof(MessageMenuManager) == 0x8);

extern RelocPtr <MessageMenuManager*> g_messageMenuManager;

typedef void (*_Debug_Notification_int)(const char* text, void* unk1, bool supressIdenticalMessages, bool unk3);
extern RelocAddr<_Debug_Notification_int> Debug_Notification_int;

void Debug_Notification (const char* text);